package cn.itcast.service.impl;

import cn.itcast.dao.RoleDao;
import cn.itcast.pojo.Role;
import cn.itcast.service.ReportService;
import cn.itcast.service.RoleService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service(interfaceClass = RoleService.class)
@Transactional
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleDao roleDao;

    /**
     * 查询所有角色
     * @return
     */
    @Override
    public List<Role> findAll() {
        return roleDao.findAll();
    }

    @Override
    public List<Integer> findRoleByUserId(Integer id) {
        return roleDao.findRoleByUserId(id);
    }
}
